/** @author mike **/
package Controllers;

import Models.CoursesTemp;
import Persistence.DaoTemp;
import Views.Students.FrmEnrollInCourses;
import java.util.ArrayList;
import java.util.List;

public class Controller_Enrolment {
    FrmEnrollInCourses _enrolmentWindow;
    DaoTemp _dao;
    
    public Controller_Enrolment(DaoTemp dao)
    {
        _enrolmentWindow = new FrmEnrollInCourses(this);
        _enrolmentWindow.setVisible(true);
        _dao = dao;
    }
    
    public void Run()
    {
        List<CoursesTemp> availableCourses = new ArrayList();
        //fill the list with data from dao;
        _enrolmentWindow.SetAvailableCourses(availableCourses);
        
        List<CoursesTemp> selectedCourses = new ArrayList();
        //fill the list with data from dao;
        _enrolmentWindow.SetSelectedCourses(selectedCourses);
    }
    
    public void Submit(List<CoursesTemp> selectedCourses)
    {
        //submit to dao the new list
    }
}
